<?
ob_start();
session_start();
include("conf/config.php");
include("conf/database.php");
include("conf/tools.php");

$emailid=$_REQUEST["email"];
$vmode=$_REQUEST["mode"];
if($vmode==0)
	$member_list = qry_data("select distinct registrant_id,full_name,email_id,reg_password from bkitc_profiles where rec_status=1 and email_id='".$emailid."'");	
else if($vmode==1 || $vmode==3){
	$memberId=$_SESSION["member_id"];
	if($vmode==3)  $memberId=$_SESSION["amember_id"];
	$member_list = qry_data("select distinct registrant_id,full_name,email_id,reg_password from bkitc_profiles where registrant_id!='".$memberId."' and rec_status=1 and email_id='".$emailid."'");	
	
}
if($vmode==0 || $vmode==1 ||  $vmode==3){
	$memberInfo=$member_list[0];
	if($emailid!=""){
	if(is_array($memberInfo))
		echo "<br/>This email already exists in the system. Please check or contact admin <a href='mailto:itncomm@bkconnect.net'>itncomm@bkconnect.net</a>";
	
	}
}
else if($vmode==6){

$mth=(int)$_REQUEST["mth"]+1;
$yr=$_REQUEST["yr"];

$date_diff=qry_data("select DATE_SUB(curdate(), INTERVAL '".$yr."-".$mth."' YEAR_MONTH) as dt1");
$date_diffs=$date_diff[0];
echo $date_diffs["dt1"];
}
else if($vmode==5){

$fdt=$_REQUEST["fdt"];
$date_diff=dateDifference(time(),$fdt);
$years=$date_diff["years"];
$months=$date_diff["months"];
echo $years.":".$months;
?>

<?
}
?>
